1. Field of the Invention
The present invention relates to the field of data processing and data communication. More specifically, the present invention relates to techniques to allow resources of data processing/data communication devices to cooperatively generate results for a sink process of these devices.
2. Background Information
FIG. 1 shows a system with source process 52 feeding n resources 54, the outputs of which are collected by sink process 56. In some applications, any of the resources 54 is capable of performing the task, and availability is the primary reason to select one resource 54 over another. For example, a computer with multiple arithmetic logic units (ALU) might give one operation to ALU #1, and give the next operation to ALU #2. Similarly, a network switch or router with multiple look-up engines (LUE) could give the first look up task to LUE #1, and the next look up task to LUE #2. In the latter example, however, it might not be possible to insure that all look-up actions terminate in the same amount of time, and therefore, the operations can finish out of order.
An example such potential out-of-order finish look-up task is look-ups performed by switches/routers to determine data associated with addresses (IP, MAC or otherwise). FIG. 2 illustrates how such look-ups are typically performed, that is by looking for matches between a presented query number 102 and a set of threaded entries 104. Each entry 106 consists of comparand 108, payload 110 and pointer 112. Each pointer 112 points to the location of the next entry, except for the last entry 106, whose xe2x80x9cpointerxe2x80x9d 112 is set to null. The query number 102 is mapped to an initial pointer 114 that points to the beginning of the thread. At each entry, the comparand 108 is matched against the query number 102. If they agree, the look up is successful, and the associated payload 110 is reported as the look up result. If they disagree, and the associated pointer 112 is non-zero, the look up process continues with the next entry 116. The process continues until either a match is found, or the last entry 106 is encountered, where the associated pointer is null (or zero). In such case, the look up process reports failure. Accordingly, each look-up may take different amount of time, and sequentially dispatched look-ups may as a result finish out-of-order.
Thus, a mechanism that can facilitate the resources to cooperatively generate results for a sink process is desired.
An apparatus is provided with a first and a second first in, first out storage structure (FIFO) that are correspondingly associated with a first and a second resource. The apparatus is further provided with first and second control logic correspondingly coupled to the first and the second FIFO to write a first and a second control value into a first and a second current write storage location of the first and the second FIFO respectively when the first resource is assigned with a first task. The first and second control logic further write the second and the first control value into a third and a fourth current write storage location of the first and the second FIFO respectively when the second resource is assigned with a second task.